package cn.xuewenbao.eduorder.service;

import cn.xuewenbao.eduorder.entity.Eduorder;
import cn.xuewenbao.eduorder.entity.PayLog;
import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * <p>
 * 支付日志表 服务类
 * </p>
 *
 * @author mafayu
 * @since 2021-06-30
 */
public interface PayLogService extends IService<PayLog> {

    //生成微信支付二维码接口
    Result<Map> createNatvie(String orderNo);

    //根据订单号查询订单支付状态
    Map<String, String> queryPayStatus(String orderNo);

    //向支付表添加记录，更新订单状态
    void updateOrdersStatus(Map<String, String> map);

    //返回微信APP支付所需的信息，统一下单接口
    Result<Map> createAppPay(String orderNo, HttpServletRequest request);

    //返回支付宝APP支付所需的信息
    Result<Map> createALiPay(String orderNo) throws AlipayApiException;

    String notifyAli(HttpServletRequest request, HttpServletResponse response);

    //查询支付宝订单状态
    Result<Eduorder> queryAliPayStatus(String orderNo);

}
